package com.wanmait.bootdemo.service;

import com.github.pagehelper.PageInfo;
import com.wanmait.bootdemo.mapper.AdminMapper;
import com.wanmait.bootdemo.pojo.Admin;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class AdminServiceImpl implements AdminService {
    @Resource
    private AdminMapper adminMapper;

    @Override
    public void insert(Admin object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Admin object) {

    }

    @Override
    public Admin findById(Integer id) {
        return adminMapper.selectOne(id);
    }

    @Override
    public List<Admin> findAll() {
        return null;
    }

    @Override
    public PageInfo<Admin> findAll(int pageNum) {
        return null;
    }

    @Override
    public Admin login(Admin admin) {
        return adminMapper.selectByUsernameAndPassword(admin);
    }
}
